﻿
Public Class string_property
    Inherits wrappered_property(Of String)

    Private Shared ReadOnly default_type As String = GetType(string_property).Name()

    Protected Sub New(ByVal id As Int64,
                      ByVal name As String,
                      ByVal type As String)
        MyBase.New(id, name, type, AddressOf bytes_string)
    End Sub

    Public Shared Shadows Function ctor(ByVal id As Int64,
                                        ByVal name As String) As iproperty
        Return New string_property(id, name, default_type)
    End Function
End Class

Public Class cached_string_property
    Inherits wrappered_property(Of String)

    Private Shared ReadOnly default_type As String = GetType(cached_string_property).Name()

    Protected Sub New(ByVal id As Int64,
                      ByVal name As String,
                      ByVal type As String)
        MyBase.New(id, name, type, AddressOf bytes_string, AddressOf cached(Of String))
    End Sub

    Public Shared Shadows Function ctor(ByVal id As Int64,
                                        ByVal name As String) As iproperty
        Return New cached_string_property(id, name, default_type)
    End Function
End Class